{% extends "group/group_base.html" %}
{# Copyright The IETF Trust 2023, All Rights Reserved #}
{% load origin %}
{% load ietf_filters person_filters textfilters %}
{% load static %}
{% block pagehead %}
    <link rel="stylesheet" href="{% static "ietf/css/list.css" %}">
{% endblock %}
{% block group_content %}
    {% origin %}
    <h2 class="my-3">{{group.acronym|upper}} Appeals</h2>

    <table id="appeals" class="my-3 table table-sm table-striped tablesorter">
        <thead>
            <tr>
                <th class="col-1" scope="col" data-sort="date">Date</th>
                <th scope="col" data-sort="appeal">Appeal</th>
            </tr>
        </thead>
        <tbody>
            {% for appeal in appeals %}
            <tr id="appeal-{{forloop.counter}}">
                <td id="appeal-{{forloop.counter}}-date">{{ appeal.date|date:"Y-m-d" }}</td>
                <td>{{appeal.name}}
                    <div class="buttonlist">
                    {% for part in appeal.appealartifact_set.all %}
                        <a id="artifact-{{forloop.parentloop.counter}}-{{forloop.counter}}" class="btn btn-primary btn-sm" href="{% url 'ietf.group.views.appeal_artifact' acronym=group.acronym artifact_id=part.pk %}"{% if not part.is_markdown %} download="{{part.download_name}}"{%endif%}>{{part.display_title}} - {{part.date|date:"Y-m-d"}}</a>
                    {% endfor %}
                    </div>
                </td>
            </tr>
            {% endfor %}
        </tbody>
    </table>
{% endblock %}
{% block js %}
    <script src="{% static "ietf/js/list.js" %}"></script>
{% endblock %}